package com.ruoyi.sys.vehile.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.vehile.mapper.TbChargingPileMapper;
import com.ruoyi.sys.vehile.domain.TbChargingPile;
import com.ruoyi.sys.vehile.service.ITbChargingPileService;

/**
 * 充电桩Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class TbChargingPileServiceImpl implements ITbChargingPileService
{
    @Autowired
    private TbChargingPileMapper tbChargingPileMapper;

    /**
     * 查询充电桩
     *
     * @param cpId 充电桩主键
     * @return 充电桩
     */
    @Override
    public TbChargingPile selectTbChargingPileByCpId(Long cpId)
    {
        return tbChargingPileMapper.selectTbChargingPileByCpId(cpId);
    }

    /**
     * 查询充电桩列表
     *
     * @param tbChargingPile 充电桩
     * @return 充电桩
     */
    @Override
    public List<TbChargingPile> selectTbChargingPileList(TbChargingPile tbChargingPile)
    {
        return tbChargingPileMapper.selectTbChargingPileList(tbChargingPile);
    }

    /**
     * 新增充电桩
     *
     * @param tbChargingPile 充电桩
     * @return 结果
     */
    @Override
    public int insertTbChargingPile(TbChargingPile tbChargingPile)
    {
        return tbChargingPileMapper.insertTbChargingPile(tbChargingPile);
    }

    /**
     * 修改充电桩
     *
     * @param tbChargingPile 充电桩
     * @return 结果
     */
    @Override
    public int updateTbChargingPile(TbChargingPile tbChargingPile)
    {
        return tbChargingPileMapper.updateTbChargingPile(tbChargingPile);
    }

    /**
     * 批量删除充电桩
     *
     * @param cpIds 需要删除的充电桩主键
     * @return 结果
     */
    @Override
    public int deleteTbChargingPileByCpIds(Long[] cpIds)
    {
        return tbChargingPileMapper.deleteTbChargingPileByCpIds(cpIds);
    }

    /**
     * 删除充电桩信息
     *
     * @param cpId 充电桩主键
     * @return 结果
     */
    @Override
    public int deleteTbChargingPileByCpId(Long cpId)
    {
        return tbChargingPileMapper.deleteTbChargingPileByCpId(cpId);
    }
}
